package org.skyui.views;

import org.skyui.beans.AbstractBean;
import org.skyui.jpa.JPAManager;

import com.vaadin.Application;

public class ExistingBeanView extends AbstractBeanView {

	/**
	 * 
	 */
	private static final long serialVersionUID = 63887912824783189L;

	public ExistingBeanView(String name, String explanation, AbstractBean bean,
			Application application) {
		super(name, explanation, bean, application);
	}

	protected void actionAfterValidation() {
		JPAManager.persist(this.item.getBean());
		if (this.parentTab != null)
			this.parentTab.refresh();
	}

	protected void actionAfterCancel() {
	}

}
